﻿#include "MaterialBRDFNodeViewModel.h"

#include "MaterialGraph/Node/MaterialGraphNodeModel.h"
#include "MaterialBRDFNodeModel.h"

#include "MaterialGraph/Pin/MaterialGraphPinViewModel.h"
#include "MaterialGraph/MaterialGraphViewModel.h"

void RMaterialBRDFNodeViewModel::BindModel(TSharedObjectPtr<RMaterialGraphNodeModel> InModel, TSharedObjectPtr<RMaterialGraphViewModel> InGraph)
{
    Super::BindModel(InModel, InGraph);
    BRDFModel = InModel;

    //assign the pin line index
    InputViewModels[0]->SetLineIndex(1);
    InputViewModels[1]->SetLineIndex(2);
    InputViewModels[2]->SetLineIndex(3);
    InputViewModels[3]->SetLineIndex(4);
}

SColor RMaterialBRDFNodeViewModel::GetTitleBackgroundColor() const
{
    return GetOutputNodeTitleBackgroundColor();
}

CString RMaterialBRDFNodeViewModel::GetInputPinName(int64_t Index) const
{
    switch (Index)
    {
    case 0:
        return U"基础颜色";
    case 1:
        return U"金属度";
    case 2:
        return U"粗糙度";
    case 3:
        return U"法线";
    default:
        assert(false);
        return U"";
    }
    
}
